PBDTGetPath
DTPBPtr paramBlock ; pointer to a DTPB Param Block
To get the access path to a database or to create a database if one does not exist
number in the ioDTRefNum field, which represents the access path to the
database. You specify the volume by passing a pointer to its name in the
ioNamePtr field or a volume reference number in the ioVRefNum field. If the
desktop database is not already open, PBDTGetPath opens it and then returns the reference number. If the desktop database does not exist, PBDTGetPath creates it. If PBDTGetPath fails, it sets the ioDTRefNum field to 0. Parameter block
۬ 16 ioResult short result code
ۮ 18 ioNamePtr long volume name or full pathname
ۮ 22 ioVRefNum short volume reference number
۬ 24 ioDTRefNum short desktop database reference number
Returns: an Error code. It will be one of the following:
noErr (0) No error
ioErr (-36) I/O error
extFSErr (-58) External file system-file system identifier is nonzero
desktopDamagedErr (-1305) The desktop database has become corrupted-the
Finder will fix this, but if your application is not running with the Finder, use PBDTReset or
Note: This routine runs synchronously only.
You cannot use the desktop reference number as a file reference number in
Warning: Do not call PBDTGetPath at interrupt time-it allocates memory in the system heap.